swap Interface

public interface swap

An interface to the swap routines.


Module Procedures

private subroutine swap_dbl(x, y, err)

Swaps the contents of two arrays.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), dimension(:) :: x

On input, the first array to swap. On output, the contents of the first array are copied to the second array.

real(kind=real64), intent(inout), dimension(:) :: y

On input, the second array to swap. On output, the contents of the second array are copied to the first array.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.

private subroutine swap_cmplx(x, y, err)

Swaps the contents of two arrays.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(inout), dimension(:) :: x

On input, the first array to swap. On output, the contents of the first array are copied to the second array.

complex(kind=real64), intent(inout), dimension(:) :: y

On input, the second array to swap. On output, the contents of the second array are copied to the first array.

class(errors), intent(inout), optional, target :: err

An error object to report any errors that occur.